﻿Imports QLPhuTungOto.Data
Imports DevExpress.LookAndFeel

Public Class frmChiTietPT

    Dim pTung As PhuTung

    Public Sub New(ByVal pt As PhuTung)

        pTung = New PhuTung
        pTung = pt

        UserLookAndFeel.Default.SetSkinStyle("Metropolis")
        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

    End Sub

    Private Sub frmChiTietPT_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim s As String = ""
        Try
            picPhuTung.Image = Image.FromFile("..\Images\NoImage.bmp")
        Catch ex As Exception

        End Try

        s &= "Số thứ tự: " & pTung.Stt & vbCrLf
        s &= "Mã phụ tùng: " & pTung.MaPhuTung & vbCrLf
        s &= "Tên phụ tùng: " & pTung.TenPhuTung & vbCrLf
        s &= "Số lượng tồn: " & pTung.SoLuong & vbCrLf
        s &= "Đơn giá: " & pTung.GiaBan & "/" & pTung.DonVi & vbCrLf
        s &= "Loại phụ tùng: " & pTung.LoaiPhuTung.TenLoaiPhuTung & vbCrLf
        s &= "Nhà cung cấp: " & pTung.NhaCungCap.TenNhaCungCap
        meChiTiet.Text = s
        'picPhuTung.BackgroundImage = Image.FromFile(pTung.HinhAnh.DuongDan)
    End Sub
End Class